﻿using Flurl.Http;
using System.Net.Http;
using System;

namespace Common;
/// <summary>
/// flurl 基类  继承了 然后再注入到AddHttpClient 就可以使用了
/// </summary>
public abstract class FlurlBase
{
    private readonly HttpClient _httpClient;
    protected readonly IFlurlClient _flurlClient;

    protected FlurlBase(HttpClient httpClient)
    {
        _httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
        _flurlClient = new FlurlClient(_httpClient);
    }
}